package github.kawaiior.yuanchuxiuzhen.core.init.event;

import github.kawaiior.yuanchuxiuzhen.core.init.EntityInit;
import net.minecraft.entity.ai.attributes.Attributes;
import net.minecraft.entity.monster.MonsterEntity;
import net.minecraftforge.event.entity.EntityAttributeCreationEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;

@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
public class AttributesSetEvent {
    @SubscribeEvent
    public static void setupAttributes(EntityAttributeCreationEvent event){
//        event.put(EntityInit.EXAMPLE_ENTITY.get(), ExampleEntity.func_234301_m_().create());

        event.put(EntityInit.COFFIN_GUARD.get(),
                MonsterEntity.func_234295_eP_().createMutableAttribute(Attributes.MAX_HEALTH, 30.0D)
                        .createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D)
                        .createMutableAttribute(Attributes.ATTACK_DAMAGE, 1.0D).create());

        event.put(EntityInit.SOUL_IRON_BEAST.get(),
                MonsterEntity.func_234295_eP_().createMutableAttribute(Attributes.MAX_HEALTH, 70.0D)
                        .createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.35D)
                        .createMutableAttribute(Attributes.ATTACK_DAMAGE, 15.0D).create());

        event.put(EntityInit.SOUL_WANDERING_ENTITY.get(),
                MonsterEntity.func_234295_eP_().createMutableAttribute(Attributes.MAX_HEALTH, 10D)
                        .createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D)
                        .createMutableAttribute(Attributes.ATTACK_DAMAGE, 3.0D).create());

        // ADDON
        // 一级妖兽10HP 1A
        // 二级妖兽30HP 3A
        // 三级妖兽80HP 8A
        // 四级妖兽300HP 15A
        // 七级500HP 30A
        // 九级1000HP 50A
        event.put(EntityInit.RAIN_FROG_ENTITY.get(),
                MonsterEntity.func_234295_eP_().createMutableAttribute(Attributes.MAX_HEALTH, 10D)
                        .createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D)
                        .createMutableAttribute(Attributes.ATTACK_DAMAGE, 1.0D).create());

        event.put(EntityInit.HOST_CRAB_ENTITY.get(),
                MonsterEntity.func_234295_eP_().createMutableAttribute(Attributes.MAX_HEALTH, 10D)
                        .createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D)
                        .createMutableAttribute(Attributes.ATTACK_DAMAGE, 1.0D).create());

        event.put(EntityInit.PU_BIRD_ENTITY.get(),
                MonsterEntity.func_234295_eP_().createMutableAttribute(Attributes.MAX_HEALTH, 10D)
                        .createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D)
                        .createMutableAttribute(Attributes.ATTACK_DAMAGE, 1.0D).create());

        event.put(EntityInit.EAGLE_OWL_ENTITY.get(),
                MonsterEntity.func_234295_eP_().createMutableAttribute(Attributes.MAX_HEALTH, 30D)
                        .createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D)
                        .createMutableAttribute(Attributes.ATTACK_DAMAGE, 3.0D).create());

        event.put(EntityInit.ARMY_ANT_ENTITY.get(),
                MonsterEntity.func_234295_eP_().createMutableAttribute(Attributes.MAX_HEALTH, 30D)
                        .createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D)
                        .createMutableAttribute(Attributes.ATTACK_DAMAGE, 8.0D).create());

        event.put(EntityInit.STONE_GIANT_ENTITY.get(),
                MonsterEntity.func_234295_eP_().createMutableAttribute(Attributes.MAX_HEALTH, 80D)
                        .createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D)
                        .createMutableAttribute(Attributes.ATTACK_DAMAGE, 8.0D).create());

        event.put(EntityInit.BONE_WOLF_ENTITY.get(),
                MonsterEntity.func_234295_eP_().createMutableAttribute(Attributes.MAX_HEALTH, 80D)
                        .createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D)
                        .createMutableAttribute(Attributes.ATTACK_DAMAGE, 8.0D).create());

        event.put(EntityInit.THUNDER_DEER_ENTITY.get(),
                MonsterEntity.func_234295_eP_().createMutableAttribute(Attributes.MAX_HEALTH, 80D)
                        .createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D)
                        .createMutableAttribute(Attributes.ATTACK_DAMAGE, 8.0D).create());

        event.put(EntityInit.STONE_CAMEL_ENTITY.get(),
                MonsterEntity.func_234295_eP_().createMutableAttribute(Attributes.MAX_HEALTH, 300D)
                        .createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D)
                        .createMutableAttribute(Attributes.ATTACK_DAMAGE, 15.0D).create());

        event.put(EntityInit.BEAST_KING_ENTITY.get(),
                MonsterEntity.func_234295_eP_().createMutableAttribute(Attributes.MAX_HEALTH, 300D)
                        .createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D)
                        .createMutableAttribute(Attributes.ATTACK_DAMAGE, 15.0D).create());

        event.put(EntityInit.THUNDER_FIELD_CROCODILE_ENTITY.get(),
                MonsterEntity.func_234295_eP_().createMutableAttribute(Attributes.MAX_HEALTH, 300D)
                        .createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D)
                        .createMutableAttribute(Attributes.ATTACK_DAMAGE, 15.0D).create());

        event.put(EntityInit.KIRIN_ENTITY.get(),
                MonsterEntity.func_234295_eP_().createMutableAttribute(Attributes.MAX_HEALTH, 1000D)
                        .createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D)
                        .createMutableAttribute(Attributes.ATTACK_DAMAGE, 50.0D).create());

        event.put(EntityInit.WHITE_POND_ENTITY.get(),
                MonsterEntity.func_234295_eP_().createMutableAttribute(Attributes.MAX_HEALTH, 500)
                        .createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D)
                        .createMutableAttribute(Attributes.ATTACK_DAMAGE, 30.0D).create());

        event.put(EntityInit.FIRE_FOX_ENTITY.get(),
                MonsterEntity.func_234295_eP_().createMutableAttribute(Attributes.MAX_HEALTH, 1000D)
                        .createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D)
                        .createMutableAttribute(Attributes.ATTACK_DAMAGE, 50.0D).create());
    }
}
